/**
 * Created by Honghaiw on 2017/4/13.
 */

var normalMapLayer_A = L.tileLayer.chinaProvider('TianDiTu_ZJ.Normal_4316.Map', {
    maxZoom: 16,
    minZoom: 4,
    zoomOffset: 1
});

var normalAnnoLayer_A = L.tileLayer.chinaProvider('TianDiTu_ZJ.Normal_4316.Annotation', {
    maxZoom: 16,
    minZoom: 4,
    zoomOffset: 1
});

var SatelliteMapLayer_A = L.tileLayer.chinaProvider('TianDiTu_ZJ.Satellite_4326.Map', {
    maxZoom: 16,
    minZoom: 4,
    zoomOffset: 1
});

var SatelliteaAnnolayer_A = L.tileLayer.chinaProvider('TianDiTu_ZJ.Satellite_4326.Annotation', {
    maxZoom: 16,
    minZoom: 4,
    zoomOffset: 1
});

var normalMapLayer_B = L.tileLayer.chinaProvider('TianDiTu_ZJJH.Normal_4326.Map', {
    maxZoom: 19,
    minZoom: 17,
    zoomOffset: 1
});

var normalAnnoLayer_B = L.tileLayer.chinaProvider('TianDiTu_ZJJH.Normal_4326.Annotation', {
    maxZoom: 19,
    minZoom: 17,
    zoomOffset: 1
});

var SatelliteMapLayer_B = L.tileLayer.chinaProvider('TianDiTu_ZJJH.Satellite_4326.Map', {
    maxZoom: 19,
    minZoom: 17,
    zoomOffset: 1
});

var SatelliteaAnnolayer_B = L.tileLayer.chinaProvider('TianDiTu_ZJJH.Satellite_4326.Annotation', {
    maxZoom: 19,
    minZoom: 17,
    zoomOffset: 1
});

var normal = L.layerGroup([normalMapLayer_A,normalAnnoLayer_A,normalMapLayer_B,normalAnnoLayer_B]);
var Satellite = L.layerGroup([SatelliteMapLayer_A, SatelliteaAnnolayer_A,SatelliteMapLayer_B, SatelliteaAnnolayer_B]);

var baseLayers = {
    "电子地图": normal,
    "影像地图": Satellite
};

var BountTileLayer = new AgTileLayer(config.agTileMapUrl+'/YKGZ/BOUNT');

var highLightLayer = new L.layerGroup();

var GYZCJsonLayer;

var drawLayer;
